An organization can utilize many different documents, some of which are formatted according to different schemas. Schemas specify a syntactic relationship, structure, and element and attribute names by which documents can be interpreted. The extensible markup language (XML) standard provides a common example of a schema.
Schemas impose a set of constraints. Schemas typically restrict, for example, element and attribute names and their allowable containment hierarchies. For example, a particular schema might only allow an element named “birthday” to contain one element named “month” and one element named “day;” the “month” element's character data may be defined as being confined to the choices ‘JAN’, ‘FEB’ . . . , ‘NOV’, ‘DEC’ according to a particular schema language's conventions, perhaps meaning that it must not only be formatted in this way, but also must not be processed as if it were some other type of data. An attempt to reference a “birthday” containing an element named “date” in that schema might fail.
Typically, an application program interface (API) which accesses a document has been written with the assumption that a particular schema is associated with the documents that are of interest to the API. An organization may have great numbers of documents formatted according to different schemas. A document formatted according to one schema may not necessarily be properly interpreted by an API that was written assuming a different schema.
Compounding this problem is that different organizations may use sets of schemas which differ greatly from other organizations' schemas for conceptually analogous or related documents. Moreover, even within an organization, variations of schemas can be used, such as for particular languages (English, French, etc.) or different customers.
The Document Object Model (DOM) is an attempt to provide one API for accessing XML documents which crosses all schemas. A DOM implementation presents an XML document as a tree structure, or allows a software application to build an XML document tree structure from scratch. However, this does not solve the problem that there are documents which exist with different schemas.